<?php
/* --------------------------------------------------------------
   pangora.php 2010-07-29 gm
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2010 Gambio GmbH
   Released under the GNU General Public License
   --------------------------------------------------------------
*/
?><?php
class Pangora{
	var $v_partnerlink;
	var $v_export_type;
	var $v_module_name;
	var $v_module_homepage;
	var $v_module_format;
	var $v_module_export_filename;
	var $v_filename;
	var $v_keyname;
	var $v_linkname;
	var $v_delimiter;
	var	$v_enclosure;

	var $v_field_filename;
	var $v_field_customers_groups;
	var $v_field_currency;
	var $v_field_shipping_costs;
	var $v_field_shipping_costs_free;
	var $v_field_attributes;
	var $v_field_campaign;
	var $v_field_export;

	function Pangora() {
		$this->formSettings();
	}

	function formSettings(){
		$this->v_partnerlink='';
		$this->v_export_type='comparison';
		$this->v_module_name='Pangora.de';
		$this->v_module_homepage='www.pangora.de';
		$this->v_module_format='txt';
		$this->v_module_export_filename='pangora.txt';
		$this->v_filename='pangora.php';
		$this->v_keyname='PANGORA';
		$this->v_linkname='pangora';
		$this->v_delimiter='|';
		$this->v_enclosure='"';

		$this->v_field_filename=true;
		$this->v_field_customers_groups=true;
		$this->v_field_currency=true;
		$this->v_field_shipping_costs=true;
		$this->v_field_shipping_costs_free=true;
		$this->v_field_attributes=true;
		$this->v_field_campaign=true;
		$this->v_field_export=true;
	}

	function formAddOn(){

	}

	function formatResults($p_products_array){
		$p_products_array['products_price']=number_format( (double)$p_products_array['products_price'], 2, '.', '');
		$p_products_array['products_shipping_costs']=number_format( (double)$p_products_array['products_shipping_costs'], 2, '.', '');
		return($p_products_array);
	}

	function exportScheme(){
		$t_csv_fields_array=array();
		$t_csv_fields_array['products_id']= 'offer-id';
		$t_csv_fields_array['products_name']= 'label';
		$t_csv_fields_array['products_categories']= 'merchant-category';
		$t_csv_fields_array['products_price']= 'prices';
		$t_csv_fields_array['products_link']= 'offer-url';
		$t_csv_fields_array['manufacturers_name']= 'brand';
		$t_csv_fields_array['products_description']= 'description';
		$t_csv_fields_array['products_image_1']= 'image-url';
		$t_csv_fields_array['products_old_price']= 'old-prices';
		$t_csv_fields_array['manufacturers_n']= 'mfname';
		$t_csv_fields_array['manufacturers_pn']= 'mfpn';
		$t_csv_fields_array['products_model']= 'product-id';
		$t_csv_fields_array['products_shippingtime']= 'delivery-period';
		$t_csv_fields_array['products_shippingtime_description']= 'delivery_period_text';
		$t_csv_fields_array['products_shipping_costs']= 'delivery-charge';
		$t_csv_fields_array['products_shipping_costs_description']= 'delivery_charge_text';
		$t_csv_fields_array['packing_unit_name']= 'baseprice-unit';
		$t_csv_fields_array['packing_unit_value']= 'baseprice_value';
		$t_csv_fields_array['baseprice']= 'baseprice-amount';
		return($t_csv_fields_array);
	}

}
?>